<!--字典类型-->
<script setup lang="ts">
interface User {
  name: string;
  code: string;
  status: boolean;
}
const tableRowClassName = ({ row, rowIndex }: { row: User; rowIndex: number }) => {
  if (!row.status) {
    return "warning-row";
  } else {
    return "";
  }
};
import {
  getDictTypePage,
  getDictTypeForm,
  addDictType,
  updateDictType,
  deleteDictTypes,
} from "@/api/dict";
import {
  Edit, Warning, Plus, Close
} from '@element-plus/icons-vue'
import { ElMessage } from 'element-plus';
import { ref } from 'vue'
import { DictTypePageVO, DictTypeQuery, DictTypeForm } from "@/api/dict/types";

defineOptions({
  name: "merchantList",
  inheritAttrs: false,
});

const queryFormRef = ref(ElForm);
const dataFormRef = ref(ElForm);

const loading = ref(false);
const ids = ref<number[]>([]);
const total = ref(0);
const centerDialog = ref(false)
const centerDialog2 = ref(false)
const centerDialog3 = ref(false)
const centerDialog4 = ref(false)
const centerDialog5 = ref(false)
const centerDialog6 = ref(false)
const centerDialog7 = ref(false)
const centerDialog8 = ref(false)
const centerDialog9 = ref(false)
const centerDialog10 = ref(false)
const visible = ref(false)
const queryParams = reactive<DictTypeQuery>({
  pageNum: 1,
  pageSize: 10,
});

//const dictTypeList = ref<DictTypePageVO[]>();

/* 清零 */
const handleConfirm = () => {
  // 在这里执行确认按钮被点击时的逻辑
  console.log("确认按钮被点击了");
  open()
};

const showConfirmDialog = (confirmCallback: () => void) => {
  const handleConfirm = async () => {
    try {
      await this.$confirm("确定导出？", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      });
      // 用户点击了确认按钮
      confirmCallback();
    } catch (error) {
      // 用户点击了取消按钮或发生了其他错误
    }
  };
  return { handleConfirm };
};

/* 清零提示 */
const open = () => {
  ElMessage({
    message: '操作成功',
    type: 'success',
  })
}

const dialog = reactive({
  title: "",
  visible: false,
});

const formData = reactive<DictTypeForm>({
  status: 1,
});
/* 下拉多选 */
const handleItemClick = (operator: string): void => {
  // 处理下拉菜单项的点击事件，可以在这里执行相关逻辑
  console.log('Selected operator:', operator);
};
const rules = reactive({
  name: [{ required: true, message: "", trigger: "blur" }],
  code: [{ required: true, message: "", trigger: "blur" }],
});

/** 查询 */
function handleQuery() {
  loading.value = true;
  getDictTypePage(queryParams)
    .then(({ data }) => {
      dictTypeList.value = data.list;
      total.value = data.total;
    })
    .finally(() => {
      loading.value = false;
    });
}

/**
 * 重置查询
 */
function resetQuery() {
  queryFormRef.value.resetFields();
  queryParams.pageNum = 1;
  handleQuery();
}

/** 行复选框选中  */
function handleSelectionChange(selection: any) {
  ids.value = selection.map((item: any) => item.id);
}

/**
 * 打开字典类型表单弹窗
 *
 * @param dicTypeId 字典类型ID
 */
function openDialog(dicTypeId?: number) {
  dialog.visible = true;
  if (dicTypeId) {
    dialog.title = "修改字典类型";
    getDictTypeForm(dicTypeId).then(({ data }) => {
      Object.assign(formData, data);
    });
  } else {
    dialog.title = "新增字典类型";
  }
}

/* 退款谈话框 */
function openDictDialog2(row: DictTypePageVO) {
  dictDataDialog.visible = true;
  dictDataDialog.title = "【" + row.name + "】字典数据";

  selectedDictType.typeCode = row.code;
  selectedDictType.typeName = row.name;
}
/**  关闭字典数据弹窗 */
function closeDictDialog2() {
  dictDataDialog.visible = false;
}

/** 字典类型表单提交 */
function handleSubmit() {
  dataFormRef.value.validate((isValid: boolean) => {
    if (isValid) {
      loading.value = false;
      const dictTypeId = formData.id;
      if (dictTypeId) {
        updateDictType(dictTypeId, formData)
          .then(() => {
            ElMessage.success("修改成功");
            closeDialog();
            handleQuery();
          })
          .finally(() => (loading.value = false));
      } else {
        addDictType(formData)
          .then(() => {
            ElMessage.success("新增成功");
            closeDialog();
            handleQuery();
          })
          .finally(() => (loading.value = false));
      }
    }
  });
}

/** 关闭字典类型弹窗 */
function closeDialog() {
  dialog.visible = false;
  resetForm();
}

/**  重置字典类型表单 */
function resetForm() {
  dataFormRef.value.resetFields();
  dataFormRef.value.clearValidate();

  formData.id = undefined;
  formData.status = 1;
}

/** 删除字典类型 */
function handleDelete(dictTypeId?: number) {
  const dictTypeIds = [dictTypeId || ids.value].join(",");
  if (!dictTypeIds) {
    ElMessage.warning("请勾选删除项");
    return;
  }

  ElMessageBox.confirm("确认删除已选中的数据项?", "警告", {
    confirmButtonText: "确定",
    cancelButtonText: "取消",
    type: "warning",
  }).then(() => {
    deleteDictTypes(dictTypeIds).then(() => {
      ElMessage.success("删除成功");
      resetQuery();
    });
  });
}

const dictDataDialog = reactive({
  title: "",
  visible: false,
});

const selectedDictType = reactive({ typeCode: "", typeName: "" }); // 当前选中的字典类型

/** 打开字典数据弹窗 */
function openDictDialog(row: DictTypePageVO) {
  dictDataDialog.visible = true;
  dictDataDialog.title = "【" + row.name + "】字典数据";

  selectedDictType.typeCode = row.code;
  selectedDictType.typeName = row.name;
}

/**  关闭字典数据弹窗 */
function closeDictDialog() {
  dictDataDialog.visible = false;
}

onMounted(() => {
  handleQuery();
});


const value = ref('')
const options = [
  {
    label: '启用',
    value: '1',
  },
  {
    label: '禁用',
    value: '2',
  },
]

const options2 = [
  {
    label: '=',
    value2: '1',
  },
  {
    label: '>',
    value2: '2',
  },
  {
    label: '<',
    value2: '3',
  },
  {
    label: '>=',
    value2: '4',
  },
  {
    label: '<=',
    value2: '5',
  },
]
const value2 = ref(options2.length > 0 ? options2[0].value2 : null);

const value3 = ref('')
const options3 = [
  {
    label: '支付宝',
    value: '1',
  },
  {
    label: '小姜',
    value: '2',
  },
  {
    label: '支付产品',
    value: '3',
  },
]

const value4 = ref('')
const options4 = [
  {
    label: 'aaa',
    value: '1',
  },
  {
    label: '供应商1',
    value: '2',
  },
  {
    label: '供应商2',
    value: '3',
  },
]
/* 静态表格字段 */
const dataList = ref([
  {
    name: '商户1',
    code: 'M100001',
    status: true,
  },
  {
    name: '商户2',
    code: 'M100002',
    status: false,
  },
  {
    name: '商户3',
    code: 'M100001',
    status: true,
  },
  {
    name: '商户4',
    code: 'M100002',
    status: true,
  },
  {
    name: '商户5',
    code: 'M100001',
  },
  {
    name: '商户6',
    code: 'M100002',
    status: true,
  },
  {
    name: '商户7',
    code: 'M100001',
  },
  {
    name: '商户8',
    code: 'M100002',
    status: true,
  },
  {
    name: '商户9',
    code: 'M100001',
    status: true,
  },
  {
    name: '商户10',
    code: 'M100002',
    status: true,
  },
]);
const handleSwitchChange = (row) => {
  const statusText = row.status ? '启用' : '禁用';
  ElMessage.success(`${statusText}成功`);
  // 这里可以添加状态切换的逻辑，例如发起请求等
};

/* 分页 */
const currentPage4 = ref(4)
const pageSize4 = ref(100)
const small = ref(false)
const background = ref(false)
const disabled = ref(false)

const handleSizeChange = (val: number) => {
  console.log(`${val} items per page`)
}
const handleCurrentChange = (val: number) => {
  console.log(`current page: ${val}`)
}
</script>


<template>
  <div class="app-container">
    <div class="search-container">
      <el-form ref="queryFormRef" :model="queryParams" :inline="true" style="display: flex;width: 100%;">
        <el-form-item label="" prop="name">
          <el-select v-model="value3" clearable placeholder="所属支付产品" style="width: 200px;">
            <el-option v-for="item in options3" :key="item.value" :label="item.label" :value="item.value" />
          </el-select>
        </el-form-item>
        <el-form-item label="" prop="name">
          <el-input v-model="queryParams.keywords" placeholder="通道名称" style="width: 250px;" clearable
            @keyup.enter="handleQuery" />
        </el-form-item>
        <el-form-item label="" prop="name" style="">
          <el-select v-model="value4" clearable placeholder="供应商" style="width: 150px;">
            <el-option v-for="item in options4" :key="item.value" :label="item.label" :value="item.value" />
          </el-select>
        </el-form-item>

        <el-form-item label="" prop="name" style="display: flex;width: 180px;">
          <el-select v-model="value" clearable placeholder="通道状态" style="width: 150px;">
            <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
          </el-select>
        </el-form-item>

        <el-form-item label="" prop="name" style="display: flex;width: 180px;">
          <el-select v-model="value" clearable placeholder="产品状态" style="width: 150px;">
            <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
          </el-select>
        </el-form-item>

        <el-form-item style="width: 220px;">
          <el-button @click="resetQuery()"><i-ep-refresh />重置</el-button>
          <el-button type="primary" @click="handleQuery()"><i-ep-search />搜索</el-button>
        </el-form-item>
      </el-form>
    </div>

    <el-card shadow="never" class="table-container" style="width: 100%;">
      <template #header>
        <div style="display: flex;justify-content: space-between;">
          <div class="left" style="width: 840px;height: 40px;">
            <span
              style="background-color: #e6fffb;color: #0897b3;border: 1px solid #87e8de;padding: 2px 3px;margin-right: 3px;">支付通道数量:56</span><span
              style="background-color: #fff0f6;color: #c41d7f;border: 1px solid #ffadd2;padding: 2px 3px;margin-right: 3px;">支付通道总余额：¥-100000.00</span>
            <span
              style="border: 1px solid #ffe58f;padding: 2px 3px;background-color: #fffbe6;color: #d4884c;margin-right: 3px;">支付通道总服务费：0</span>
            <span
              style="background-color: #e6fffb;color: green;border: 1px solid lightgreen;padding: 2px 3px;">启用数量：50</span>
            <p style="border: 1px solid lightgray;padding: 2px 3px;width: 100px;line-height: 20px;margin-top: -0px;">
              禁用数量：1</p>
          </div>
          <div class="right" style="width: 300px;">
            <el-button type="primary" @click="centerDialog9 = true" style="float: right;">
              <el-icon style="margin-right: 5px;">
                <Plus />
              </el-icon>创建上游支付通道
            </el-button>
          </div>
        </div>

      </template>
      <el-table
        v-loading="loading"
        highlight-current-row
        :data="dataList"
        border
        class="tabs"
        style="width: 100%"
        @selection-change="handleSelectionChange"
        :row-class-name="tableRowClassName"
      >
        <el-table-column type="selection" min-width="55" align="center" />
        <el-table-column label="所属支付产品" prop="name" align="center" min-width="120" fixed />
        <el-table-column label="通道名称" prop="code" align="center" min-width="200" fixed style="display: flex;">
          <template #default="scope">
            <div style="display: flex; align-items: center;">
              <span
                style="padding: 2px 10px; background-color: #e6f7ff; color: #1890ff; border: 1px solid #1890ff; margin-right: 10px;"
                @click="centerDialog10 = true" class="test">测试</span>
              {{ scope.row.code }}
            </div>
          </template>
        </el-table-column>
        <el-table-column label="上游编码" prop="code" align="left" min-width="120">
          <template #default="scope">
            <div style="display: inline-grid;">
              <span><span>8008</span></span>
              <!-- <span>谷歌：<span style="color: gray;">未绑定</span></span> -->
            </div>
          </template>
        </el-table-column>
        <el-table-column label="权重" prop="remark" align="left" min-width="100">
          <template #default="scope">
            <div style="display: flex;justify-content: space-around;">
              <span style="">1</span>
              <el-icon :size="20" @click="centerDialog = true" style="color: #1890ff;" class="editweight">
                <Edit />
              </el-icon>
            </div>
          </template>
        </el-table-column>

        <el-table-column label="供应商" prop="remark" align="left" min-width="210">
          <template #default="scope">
            <div style="display:flex;">
              <span>AAAAA</span>
            </div>
          </template>
        </el-table-column>

        <el-table-column label="余额" prop="remark" align="left" min-width="170">
          <template #default="scope">
            <div style="display:flex;">
              <span style="color: #1890ff;" @click="centerDialog2 = true" class="depoist">提现</span>
              <span style="color: orange;margin-left: 10px;font-weight: bold;">￥0.00</span>
            </div>
          </template>
        </el-table-column>


        <el-table-column label="服务费" prop="remark" align="left" min-width="170">
          <template #default="scope">
            <div style="display:flex;">
              <el-popconfirm title="确认清除该通道服务费？" width="250px" @confirm="handleConfirm">
                <template v-slot:reference="{ confirm }">
                  <span style="color: #1890ff;" @click="showConfirmDialog(confirm)" class="reset">清零</span>
                  <!--  <el-button type="primary" @click="showConfirmDialog(confirm)">
                </el-button> -->
                </template>
              </el-popconfirm>

              <span style="margin-left: 10px;">￥0.00</span>
            </div>
          </template>
        </el-table-column>

        <el-table-column label="商户配置" prop="remark" align="left" min-width="170">
          <template #default="scope">
            <div style="display:flex;">
              <span style="padding: 2px 10px;background-color: #e6f7ff;color: #1890ff;border: 1px solid #1890ff;"
                @click="centerDialog3 = true" class="batch">批量分配</span>
            </div>
          </template>
        </el-table-column>


        <el-table-column label="通道状态" align="center" min-width="100">
          <template #default="{ row }">
            <el-switch v-model="row.status" inline-prompt active-text="启用" inactive-text="禁用"
              @change="handleSwitchChange(row)" />
          </template>
        </el-table-column>

        <el-table-column label="成本费率" prop="remark" align="left" min-width="170">
          <template #default="scope">
            <div style="display:flex;">
              <span>3.00%</span>
            </div>
          </template>
        </el-table-column>

        <el-table-column label="产品默认费率" prop="remark" align="left" min-width="170">
          <template #default="scope">
            <div style="display:flex;">
              <span>5.00%</span>
            </div>
          </template>
        </el-table-column>

        <el-table-column label="通道代理" prop="remark" align="left" min-width="170">
          <template #default="scope">
            <div style="display:flex;">
              <span>Agent01</span>
            </div>
          </template>
        </el-table-column>

        <el-table-column label="代理返佣" prop="remark" align="left" min-width="170">
          <template #default="scope">
            <div style="display:flex;">
              <span>0.00%</span>
            </div>
          </template>
        </el-table-column>

        <el-table-column label="开发者选项" prop="remark" align="left" min-width="160">
          <template #default="scope">
            <div style="display:flex;">
              <span style="color: #1890ff;" @click="centerDialog4 = true" class="develop">开发者配置</span>
            </div>
          </template>
        </el-table-column>

        <el-table-column fixed="right" label="操作" min-width="230">
          <template #default="scope">
            <div style="display: flex;">
              <el-button type="primary" link size="small" @click="centerDialog5 = true"
                style="font-size: 15px;">编辑</el-button>
              <el-button type="primary" link size="small" @click="centerDialog6 = true"
                style="font-size: 15px;">接口信息</el-button>
              <el-button v-hasPerm="['sys:dict_type:edit']" type="primary" link size="small" @click="centerDialog7 = true"
                style="font-size: 15px;">复制</el-button>
              <el-button v-hasPerm="['sys:dict_type:edit']" type="primary" link size="small" @click="centerDialog8 = true"
                style="color: red;font-size: 15px;">删除</el-button>
            </div>
            <!--  <div style="display: flex;">
              <el-button type="primary" link size="small" @click.stop="openDictDialog(scope.row)">对接信息</el-button>
              <el-button v-hasPerm="['sys:dict_type:delete']" type="primary" link size="small"
                @click.stop="handleDelete(scope.row.id)">删除</el-button>
            </div> -->
          </template>
        </el-table-column>
      </el-table>

      <pagination v-if="total > 0" v-model:total="total" v-model:page="queryParams.pageNum"
        v-model:limit="queryParams.pageSize" @pagination="handleQuery"
        layout="->,total, sizes, prev, pager, next, jumper" />

      <div class="demo-pagination-block" style="float: right;">
        <div class="demonstration"></div>
        <el-pagination v-model:current-page="currentPage4" v-model:page-size="pageSize4"
          :page-sizes="[100, 200, 300, 400]" :small="small" :disabled="disabled" :background="background"
          layout="total, sizes, prev, pager, next, jumper" :total="400" @size-change="handleSizeChange"
          @current-change="handleCurrentChange" />
      </div>
    </el-card>

    <!-- 编辑 -->
    <el-dialog v-model="dialog.visible" :title="dialog.title" width="500px" @close="closeDialog">
      <el-form ref="dataFormRef" :model="formData" :rules="rules" label-width="80px">
        <el-form-item label="字典名称" prop="name">
          <el-input v-model="formData.name" placeholder="请输入字典名称" />
        </el-form-item>
        <el-form-item label="字典编码" prop="code">
          <el-input v-model="formData.code" placeholder="请输入字典编码" />
        </el-form-item>
        <el-form-item label="状态" prop="status">
          <el-radio-group v-model="formData.status">
            <el-radio :label="1">正常</el-radio>
            <el-radio :label="0">停用</el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item label="备注" prop="remark">
          <el-input v-model="formData.remark" type="textarea" placeholder="字典类型备注"
            :autosize="{ minRows: 2, maxRows: 4 }" />
        </el-form-item>
      </el-form>
      <template #footer>
        <div class="dialog-footer">
          <el-button type="primary" @click="handleSubmit">确 定</el-button>
          <el-button @click="closeDialog">取 消</el-button>
        </div>
      </template>
    </el-dialog>

    <!-- 退款 -->
    <el-dialog v-model="dialog.visible" :title="dialog.title" width="500px" @close="closeDialog">
      <el-form ref="dataFormRef" :model="formData" :rules="rules" label-width="80px">
        <el-form-item label="字典名称" prop="name">
          <el-input v-model="formData.name" placeholder="请输入字典名称" />
        </el-form-item>
        <el-form-item label="字典编码" prop="code">
          <el-input v-model="formData.code" placeholder="请输入字典编码" />
        </el-form-item>
        <el-form-item label="状态" prop="status">
          <el-radio-group v-model="formData.status">
            <el-radio :label="1">正常</el-radio>
            <el-radio :label="0">停用</el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item label="备注" prop="remark">
          <el-input v-model="formData.remark" type="textarea" placeholder="字典类型备注"
            :autosize="{ minRows: 2, maxRows: 4 }" />
        </el-form-item>
      </el-form>
      <template #footer>
        <div class="dialog-footer">
          <el-button type="primary" @click="handleSubmit">确 定</el-button>
          <el-button @click="closeDialog">取 消</el-button>
        </div>
      </template>
    </el-dialog>

    <!--字典数据弹窗-->
    <el-dialog v-model="dictDataDialog.visible" :title="dictDataDialog.title" width="1000px" @close="closeDictDialog">
      <dict-item v-model:typeCode="selectedDictType.typeCode" v-model:typeName="selectedDictType.typeName" />
    </el-dialog>

    <!--权重 -->
    <el-dialog v-model="centerDialog" title="编辑权重" width="500px" align-center>
      <el-form ref="weightFormRef" :model="formData" :rules="rules" label-width="80px">
        <el-form-item label="权重" prop="name">
          <div style="display: flex;align-items: center;">

            <el-tooltip :visible="visible">
              <template #content>
                <span>权重值1~10，值越大订单越多</span>
              </template>
              <el-icon style="margin-left: -10px; margin-right: 10px;" @mouseenter="visible = true"
                @mouseleave="visible = false">
                <Warning />
              </el-icon>
            </el-tooltip>

            <el-input type="number" v-model="formData.weight" style="width: 300px;"></el-input>
          </div>
        </el-form-item>
      </el-form>
      <template #footer>
        <span class="dialog-footer">
          <el-button @click="centerDialog = false">取消</el-button>
          <el-button type="primary" @click="centerDialog = false">确定</el-button>
        </span>
      </template>
    </el-dialog>

    <!-- 余额提现 -->
    <el-dialog v-model="centerDialog2" title="提现" width="550px">
      <recharge-item />
      <span class="dialog-footer" style="margin-top:20px;display:flex;justify-content:flex-end">
        <el-button @click="centerDialog2 = false">取消</el-button>
        <el-button type="primary" @click="centerDialog2 = false">
          确认
        </el-button>
      </span>
    </el-dialog>

    <!-- 商户配置 批量分配 -->
    <el-dialog v-model="centerDialog3" title="批量分配" width="650px">
      <batch-pay />
      <span class="dialog-footer" style="margin-top:20px;display:flex;justify-content:flex-end">
        <el-button @click="centerDialog3 = false">取消</el-button>
        <el-button type="primary" @click="centerDialog3 = false">
          确认
        </el-button>
      </span>
    </el-dialog>

    <!-- 开发者配置 -->
    <el-dialog v-model="centerDialog4" title="开发者配置" width="1000px">
      <develop-pay />
      <span class="dialog-footer" style="margin-top:20px;display:flex;justify-content:flex-end">
        <el-button @click="centerDialog4 = false">取消</el-button>
        <el-button type="primary">
          保存并继续
        </el-button>
        <el-button type="primary" @click="centerDialog4 = false">
          保存
        </el-button>
      </span>
    </el-dialog>

    <!-- 编辑 -->
    <el-dialog v-model="centerDialog5" title="编辑上游支通道" width="650px">
      <edit-pay />
      <span class="dialog-footer" style="margin-top:20px;display:flex;justify-content:flex-end">
        <el-button @click="centerDialog5 = false">取消</el-button>
        <el-button type="primary" @click="centerDialog5 = false">
          确认
        </el-button>
      </span>
    </el-dialog>

    <!-- 接口信息 -->
    <el-dialog v-model="centerDialog6" title="userName" width="650px">
      <port-pay />
      <span class="dialog-footer" style="margin-top:20px;display:flex;justify-content:flex-end">
        <el-button @click="centerDialog6 = false">取消</el-button>
        <el-button type="primary" @click="centerDialog6 = false">
          确认
        </el-button>
      </span>
    </el-dialog>

    <!-- 复制 复制支付通道-->
    <el-dialog v-model="centerDialog7" title="复制支付通道" width="650px">
      <copy-pay />
      <span class="dialog-footer" style="margin-top:20px;display:flex;justify-content:flex-end">
        <el-button @click="centerDialog7 = false">取消</el-button>
        <el-button type="primary" @click="centerDialog7 = false">
          确认
        </el-button>
      </span>
    </el-dialog>

    <!-- 删除 -->
    <el-dialog v-model="centerDialog8" title="删除支付通道" width="500px">
      <delete-pay />
      <span class="dialog-footer" style="margin-top:20px;display:flex;justify-content:flex-end">
        <el-button @click="centerDialog8 = false">取消</el-button>
        <el-button type="primary" @click="centerDialog8 = false">
          确认
        </el-button>
      </span>
    </el-dialog>

    <!-- 创建上游支付通道 -->
    <el-dialog v-model="centerDialog9" title="创建上游支通道" width="650px">
      <establish-up />
      <span class="dialog-footer" style="margin-top:20px;display:flex;justify-content:flex-end">
        <el-button @click="centerDialog9 = false">取消</el-button>
        <el-button type="primary" @click="centerDialog9 = false">
          确认
        </el-button>
      </span>
    </el-dialog>

    <!-- 通道名称 测试 -->
    <el-dialog v-model="centerDialog10" title="通道名称：test" width="700px">
      <test-pay />
      <span class="dialog-footer" style="margin-top:20px;display:flex;justify-content:flex-end">
        <el-button @click="centerDialog10 = false">取消</el-button>
        <el-button type="primary" @click="centerDialog10 = false">
          确认
        </el-button>
      </span>
    </el-dialog>
  </div>
</template>
<style lang="scss" scoped>
.example-showcase .el-dropdown+.el-dropdown {
  margin-left: 15px;
}

.app-container {
  height: 100%;

  .table-container {
    height: 100%;
    //background-color: pink;

    .tabs {
      height: calc(100vh - 270px);
      overflow-y: auto;
    }

    /*  .el-card__body {
      height: 100%;
    } */
  }
}

.demo-pagination-block+.demo-pagination-block {
  // margin-top: 5px;
}

.demo-pagination-block .demonstration {
  margin-bottom: 10px;
}

.custom-popover {
  background-color: black;
  /* 设置背景颜色为黑色 */
  color: white;
  /* 设置文本颜色为白色，以确保对比度 */
}
.test:hover{
  cursor:pointer;
  opacity: 0.5;
}
.editweight:hover{
  cursor:pointer;
  opacity: 0.5;
}
.depoist:hover,.reset:hover,.batch:hover,.develop:hover{
  cursor: pointer;
  opacity: 0.5;
}
::v-deep(.warning-row) {
  opacity: 0.5;
}
</style>
